<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>三方登录</title>
</head>
<link rel="stylesheet" href="resources/css/sweetalert2.css">
<script src="./resources/js/jquery.min.js" type="text/javascript"></script>
<script src="./resources/js/common.js" type="text/javascript"></script>
<script src="resources/js/sweetalert2.min.js"></script>

<body>

</body>
<script type="text/javascript">
$(document).ready(function () {
	//一进页面就获取登录三方结果
	var urlParam = getRequest();
	console.log(urlParam);
	var result=urlParam.result;
	var msg= "绑定失败！";
	if("1"==result){
		msg= "绑定成功！";
	}
	swal({ 
		  title: msg, 
		  text: "3秒后自动跳转到主页。", 
		  timer: 3000, 
		  confirmButtonColor: "#DD6B55",
		  confirmButtonText: "确定",
	}).then((result)=>{
		//微信绑定(qq绑定没有问题)时候parent.location.href老是当前页面不知什么原因 目前强制跳转主页。
		parent.location.href=parent.location.origin+"/main.html";
	});
});
</script>
</html>